<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><{$data.name}></title>
<include file="./Apps/BoxAdmin/View/Public/header.html" />
</head>
<body>
 
   
        <div class="list_vmall_man">
        	<div class="list_vmall_le">
            	<!-- <p class="list_vmall_bin"><a href="<<{:U('level')}>>" target="_black">会员等级管理</a></p> -->
               

              
                  <include file="./Apps/BoxAdmin/View/Public/adminMenu.html" />
               
            </div>
            <div class="list_vmall_rig">
          
 <section class="content">
        <div class="page-content" >
            
    <div class="panel panel-default">
        <div class="panel-heading">
            <{$data.name}>           <a class="btn btn-primary btn-xs" href="<{:U('index')}>">返回列表</a>
        </div>
        <div class="panel-body">
             <form action="<{:U('saveConfig')}>" class="form-horizontal" method="post">
    <empty name="custom_config">
    <foreach name="data['config']" item="form" key="o_key">
    <div class="form-item cf">
    <label class="item-label">
        <{$form.title|default=''}>
        <present name="form.tip">
            <span class="check-tips"><{$form.tip}></span>
        </present>
    </label>
    <switch name="form.type">
    <case value="text">
        <div class="controls">
            <input type="text" name="config[<{$o_key}>]" class="form-control text form-input-width" value="<{$form.value}>">
        </div>
    </case>
    <case value="password">
        <div class="controls">
            <input type="password" name="config[<{$o_key}>]" class="form-control text input-large form-input-width" value="<{$form.value}>">
        </div>
    </case>
    <case value="hidden">
        <input type="hidden" name="config[<{$o_key}>]" value="<{$form.value}>">
    </case>
    <case value="radio">
        <div class="controls">
            <foreach name="form.options" item="opt" key="opt_k">
                <label class="radio-inline">
                    <input type="radio" name="config[<{$o_key}>]" value="<{$opt_k}>" <eq name="form.value" value="$opt_k"> checked</eq>><{$opt}>
                </label>
            </foreach>
        </div>
    </case>
    <case value="checkbox">
        <div class="controls">
            <foreach name="form.options" item="opt" key="opt_k">
                <label class="checkbox-inline">
                    <php>
                        is_null($form["value"]) && $form["value"] = array();
                    </php>
                    <input type="checkbox" name="config[<{$o_key}>][]" value="<{$opt_k}>" <in name="opt_k" value="$form.value"> checked</in>><{$opt}>
                </label>
            </foreach>
        </div>
    </case>
    <case value="select">
        <div class="controls">
            <select name="config[<{$o_key}>]">
                <foreach name="form.options" item="opt" key="opt_k">
                    <option value="<{$opt_k}>" <eq name="form.value" value="$opt_k"> selected</eq>><{$opt}></option>
                </foreach>
            </select>
        </div>
    </case>
    <case value="textarea">
        <div class="controls">
            <label class="textarea input-large">
                <textarea name="config[<{$o_key}>]" class="form-control form-text-area-size"><{$form.value}></textarea>
            </label>
        </div>
    </case>
     
    <case value="group">
        <ul class="nav nav-tabs">
            <volist name="form.options" id="li">
                <li data-tab="tab<{$i}>" <eq name="i" value="1">class="active"</eq>><a data-toggle="tab" href="#tab<{$i}>"><{$li.title}></a></li>
            </volist>
        </ul>


        <div class="tab-content with-padding">
            <volist name="form.options" id="tab">
                <div id="tab<{$i}>" class="tab-pane <eq name="i" value="1">active</eq> tab<{$i}>">
                <foreach name="tab['options']" item="tab_form" key="o_tab_key">
                    <label class="item-label">
                        <{$tab_form.title|default=''}>
                        <present name="tab_form.tip">
                            <span class="check-tips"><{$tab_form.tip}></span>
                        </present>
                    </label>
                    <div class="controls">
                        <switch name="tab_form.type">
                            <case value="text">
                                <input type="text" name="config[<{$o_tab_key}>]" class="text input-large form-control form-input-width" value="<{$tab_form.value}>">
                            </case>
                            <case value="password">
                                <input type="password" name="config[<{$o_tab_key}>]" class="text input-large form-control form-input-width" value="<{$tab_form.value}>">
                            </case>
                            <case value="hidden">
                                <input type="hidden" name="config[<{$o_tab_key}>]" value="<{$tab_form.value}>">
                            </case>
                            <case value="radio">
                                <foreach name="tab_form.options" item="opt" key="opt_k">
                                    <label class="radio-inline">
                                        <input type="radio" name="config[<{$o_tab_key}>]" value="<{$opt_k}>" <eq name="tab_form.value" value="$opt_k"> checked</eq>><{$opt}>
                                    </label>
                                </foreach>
                            </case>
                            <case value="checkbox">
                                <foreach name="tab_form.options" item="opt" key="opt_k">
                                    <label class="checkbox-inline">
                                        <php> is_null($tab_form["value"]) && $tab_form["value"] = array();</php>
                                        <input type="checkbox" name="config[<{$o_tab_key}>][]" value="<{$opt_k}>" <in name="opt_k" value="$tab_form.value"> checked</in>><{$opt}>
                                    </label>
                                </foreach>
                            </case>
                            <case value="select">
                                <select name="config[<{$o_tab_key}>]">
                                    <foreach name="tab_form.options" item="opt" key="opt_k">
                                        <option value="<{$opt_k}>" <eq name="tab_form.value" value="$opt_k"> selected</eq>><{$opt}></option>
                                    </foreach>
                                </select>
                            </case>
                            <case value="textarea">
                                <label class="textarea input-large">
                                    <textarea name="config[<{$o_tab_key}>]" class="form-control form-text-area-size"><{$tab_form.value}></textarea>
                                </label>
                            </case>
                             
                        </switch>
                    </div>
                </foreach>
        </div>
        </volist>
    </div>
    
    </case>
    </switch>

    </div>
    </foreach>
    <else />
    <present name="custom_config">
        <{$custom_config}>
    </present>
    </empty>

    <div style="margin-top: 10px">

        <input type="hidden" name="id" value="<{:I('id')}>" readonly>
        <button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确定</button>
        <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返回</button>
        </div>
    </div>

    </form>
        </div>
    </div>
   

        </div>
    </section>
                
                </div>
            </div>
       
        
    </div>
 

 
     
 
</body>
</html>
